Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(and, app(p, x)), app(app(forall, p), xs))
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forall, p), app(app(cons, x), xs)) → APP(and, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(or, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(or, app(p, x)), app(app(forsome, p), xs))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(and, app(p, x)), app(app(forall, p), xs))
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forall, p), app(app(cons, x), xs)) → APP(and, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(or, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(or, app(p, x)), app(app(forsome, p), xs))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(and, app(p, x)), app(app(forall, p), xs))
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forall, p), app(app(cons, x), xs)) → APP(and, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(or, app(p, x))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(or, app(p, x)), app(app(forsome, p), xs))
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 4 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
QDP
                  ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


APP(app(forall, p), app(app(cons, x), xs)) → APP(p, x)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(p, x)
The remaining pairs can at least be oriented weakly.

APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)
Used ordering: Combined order from the following AFS and order.
APP(x1, x2)  =  x1
app(x1, x2)  =  app(x2)
forall  =  forall
cons  =  cons
forsome  =  forsome

Lexicographic Path Order [19].
Precedence:
[app1, forall] > forsome
cons > forsome


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
QDP
                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 2 SCCs.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
QDP
                            ↳ QDPOrderProof
                          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

FORSOME(p, cons(x, xs)) → FORSOME(p, xs)

R is empty.
The set Q consists of the following terms:

and(true, true)
and(true, false)
and(false, true)
and(false, false)
or(true, true)
or(true, false)
or(false, true)
or(false, false)
forall(x0, nil)
forall(x0, cons(x1, x2))
forsome(x0, nil)
forsome(x0, cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP(app(forsome, p), app(app(cons, x), xs)) → APP(app(forsome, p), xs)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
FORSOME(x1, x2)  =  FORSOME(x2)
cons(x1, x2)  =  cons(x1, x2)

Lexicographic Path Order [19].
Precedence:
cons2 > FORSOME1


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ PisEmptyProof
                          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)

The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

FORALL(p, cons(x, xs)) → FORALL(p, xs)

R is empty.
The set Q consists of the following terms:

and(true, true)
and(true, false)
and(false, true)
and(false, false)
or(true, true)
or(true, false)
or(false, true)
or(false, false)
forall(x0, nil)
forall(x0, cons(x1, x2))
forsome(x0, nil)
forsome(x0, cons(x1, x2))

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


APP(app(forall, p), app(app(cons, x), xs)) → APP(app(forall, p), xs)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
FORALL(x1, x2)  =  FORALL(x2)
cons(x1, x2)  =  cons(x1, x2)

Lexicographic Path Order [19].
Precedence:
cons2 > FORALL1


The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ QDPOrderProof
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ AND
                          ↳ QDP
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(and, true), true) → true
app(app(and, true), false) → false
app(app(and, false), true) → false
app(app(and, false), false) → false
app(app(or, true), true) → true
app(app(or, true), false) → true
app(app(or, false), true) → true
app(app(or, false), false) → false
app(app(forall, p), nil) → true
app(app(forall, p), app(app(cons, x), xs)) → app(app(and, app(p, x)), app(app(forall, p), xs))
app(app(forsome, p), nil) → false
app(app(forsome, p), app(app(cons, x), xs)) → app(app(or, app(p, x)), app(app(forsome, p), xs))

The set Q consists of the following terms:

app(app(and, true), true)
app(app(and, true), false)
app(app(and, false), true)
app(app(and, false), false)
app(app(or, true), true)
app(app(or, true), false)
app(app(or, false), true)
app(app(or, false), false)
app(app(forall, x0), nil)
app(app(forall, x0), app(app(cons, x1), x2))
app(app(forsome, x0), nil)
app(app(forsome, x0), app(app(cons, x1), x2))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.